<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<% 
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title></title>
		<link type="text/css" rel="stylesheet" href="<%=path %>/admin/styles/default.css" />
		<script type="text/javascript" src="<%=path %>/res/js/jquery.js"></script>
		<script type="text/javascript" src="<%=path %>/res/js/common.js"></script>
		<script type="text/javascript" src="<%=path %>/admin/utils/My97DatePicker/WdatePicker.js"></script>
		<script type="text/javascript" src="<%=path%>/admin/utils/kindeditor/kindeditor-min.js"></script>
		<script type="text/javascript" src="<%=path %>/admin/pages/message/js/messageAdd.js"></script>
		<script>
			KE.show({
				id : 'editor',
				cssPath : '<%=path %>/admin/utils/kindeditor/index.css',
				imageUploadJson:'<%=path %>/admin/utils/kindeditor/jsp/upload_json.jsp'
			});
		</script>
	</head>
	<body>
		<form name="form1" method="post" enctype="multipart/form-data" action="<%=path %>/admin/message!create.action" onsubmit="">
		<input type="hidden" id="message" value="${message}"/>
		<input type="hidden" id="webPath" value="<%=path %>"/>
		<input type="hidden" id="method" value="<s:property value="#request.method"/>"/>
		<input type="hidden" id="msgId" name="messageBean.msgId" value="<s:property value="messageBean.msgId"/>"/>
		<input type="hidden" id="msgState" name="messageBean.msgState" value="<s:property value="messageBean.msgState"/>"/>
		<input type="hidden" value="" id="msgContent" name="messageBean.msgContent" />
		<input type="hidden" value="<s:property value="messageBean.msgCover"/>" id="msgCover" name="messageBean.msgCover" />
		<table id="table-data-outter">
			<tr>
				<td>
					<table id="table-data-inner" cellspacing="1">
						<tr id="tr-menu-path">
							<td colspan="5" nowrap="nowrap">
								<fieldset id="f-menu-path">当前位置:&nbsp;信息管理 &gt; 添加信息</fieldset>
								<fieldset id="f-condition-display">
										<img src="<%=path%>/admin/images/main/display_on.gif" onclick="displayCondition(this,'tr-menu-path')" 
											align="bottom" width="17" height="15" alt="隐藏查询条件" /></fieldset>
							</td>
						</tr>
						<s:if test='messageBean.msgState == "2"'>
						<tr id="tr-condition">
							<td width="20%" class="field-title">驳回原因: </td>
							<td width="600" class="field-content" colspan="5" style="word-break:all;word-wrap:break-word;line-height:20px;">
								<s:if test='rejectList != null && rejectList.size() > 0'>
								<s:iterator value="rejectList" status="index">
									<s:property value="#index.count"/>.
									<s:property value="rejReason"/>
									---<s:property value="rejPerson"/>
									---<s:property value="rejTime"/>
									<br/>
								</s:iterator>
								</s:if>
							</td>
						</tr>
						</s:if>
						<tr id="tr-condition">
							<td width="20%" class="field-title">信息标题: </td>
							<td width="30%" class="field-content">
								<input type="text" class="input" style="width:200px;" 
								name="messageBean.msgTitle" id="msgTitle" value="<s:property value="messageBean.msgTitle"/>" maxlength="100"/>
								<span class="font_red">*</span>
							</td>
							<td width="20%" class="field-title">信息栏目: </td>
							<td width="30%" class="field-content">
								<select onchange="changeType(this.value)">
									<s:iterator value="typeList" status="index">
									<option value="<s:property value="menuId"/>" <s:if test='parentId == menuId'>selected="selected"</s:if>>
										<s:property value="menuName"/>
									</option>
									</s:iterator>
								</select>
								　－　
								<select id="id_subType" name="messageBean.msgType">
									<s:iterator value="typeSubList" status="index">
									<option value="<s:property value="menuId"/>" <s:if test='messageBean.msgType == menuId'>selected="selected"</s:if>>
										<s:property value="menuName"/>
									</option>
									</s:iterator>
								</select>
							</td>
						</tr>
						<tr id="tr-condition">
							<td width="20%" class="field-title">信息来源: </td>
							<td width="30%" class="field-content">
								<input type="text" class="input" style="width:200px;" 
								name="messageBean.msgSource" id="msgSource" value="<s:property value="messageBean.msgSource"/>" maxlength="25"/>
								<span class="font_red">*</span>
							</td>
							<td width="20%" class="field-title"> </td>
							<td width="30%" class="field-content">
	
							<input type="hidden" value="1" name="messageBean.disEnable" id="notallowComment"/>

								
							</td>
						</tr>
						<tr id="tr-condition">
							<td width="15%" class="field-title">信息内容: </td>
							<td width="85%" class="field-content" colspan="3">
								<textarea id="editor" name="editor"
								style="width: 680px; height:360px; border: 1px"><s:property value="messageBean.msgContent"/></textarea>
							</td>
						</tr>
						<tr id="tr-condition">
							<td width="15%" class="field-title">信息封面: </td>
							<td width="85%" class="field-content" colspan="3">
								<input type="file" name="fileBean.file" style="width:329px;"/>
								<s:if test='messageBean.msgCover != null && messageBean.msgCover != ""'>
									<img src="<%=path %><s:property value="messageBean.msgCover"/>" alt="" />
								</s:if>
								
							</td>
						</tr>
						<tr id="tr-condition">
							<td width="15%" class="field-title">上传附件: </td>
							<td width="85%" class="field-content" colspan="3">
								<input type="file" name="attachmentFileBean.file" style="width:329px;"/>
								<s:if test='messageBean.msgAttachment != null && messageBean.msgAttachment != ""'>
                                                                    <a href="<%=path %><s:property value="messageBean.msgAttachment"/>" target="_blank" ><s:property value="messageBean.msgAttachmentShow"/></a>
								</s:if>
								
							</td>
						</tr>
					</table>
					<div id="div-button" align="center">
						<input type="button" value="提交信息" onclick="submitMsg()" style="margin-left: 30px;"/>
						<s:if test='#request.method == "update"'>
						<input type="button" value="返　　回" onclick="javascript:history.back();" style="margin-left:30px;"/>
						</s:if>
					</div>
				</td>
			</tr>
		</table>
		</form>
	</body>
</html>